</td></tr>
<tr><td align="right"><p class="textStd">

<input type="Hidden" name="todo" value="">

<?
if ($this->allow_edit) 
{ 
	$f = false;
	foreach($this->buttons as $b) 
	{
		if ($f) echo "&nbsp;\n";
?>
<input type="Button" value="<?=$b['t']?>" onClick="javascript: process_button(<?=$b['ws']?>, '<?=$b['td']?>');"
	style="width: 150;" class="button2" onMouseOver="this.className='button2_act'" onMouseOut="this.className='button2'">
<? 
		$f = true;
	}
}
?>
	
</td></tr>
</table>

</form>

<form name="form_misc" action="<?=$this->page_name?>_edit.php" method="post">
	<input type="Hidden" name="todo" value="">
	<input type="Hidden" name="id" value="">
</form>


<script type="text/javascript" language="JavaScript">
function process_button(ws, td) {
<? 
foreach($this->buttons as $b) if (isset($b['conf'])) {
	echo "\t".'if (td == "'.$b['td'].'" && !confirm("'.$b['conf'].'")) return;'."\n";
} 
?>
	var f = ws ? document.form_main : document.form_misc;
	f.todo.value = td;
	f.submit();
}
</script>

